var HTMLCanvasElement = function HTMLCanvasElement() {
    //如果不能new  要抛出一个错误
    throw new TypeError("Illegal constructor");
}//构造函数
catvm.safefunction(HTMLCanvasElement); //tostring 保护
//设置原型链上显示的名字***************************************************************************
Object.defineProperties(HTMLCanvasElement.prototype, {
    [Symbol.toStringTag]: {
        value: "HTMLCanvasElement",
        configurable: true
    }
});
// 原型指向原型父亲***************************************************************************
HTMLCanvasElement.prototype.__proto__ = HTMLElement.prototype
//添加div标签***************************************************************************
catvm.memory.htmlelements['canvas']=function (o) {
    var canvas=new(function () {});
    // 属性及方法
    canvas.catvm_index = (catvm.domele[catvm.domele.length-1].catvm_index)+1
    canvas.getContext=function getContext(e) {
        if (e==='2d'){
            return CanvasRenderingContext2D
        }
        debugger;
    };catvm.safefunction(canvas.getContext);
    canvas.toDataURL=function toDataURL() {
        return ''
    };catvm.safefunction(canvas.toDataURL);
    canvas.__proto__=HTMLCanvasElement.prototype;
    canvas.style = o?.style === undefined ? {}:o.style
    catvm.domele.push(canvas)
    return catvm.proxy(canvas)
}
//属性、方法
CanvasRenderingContext2D=catvm.proxy(class CanvasRenderingContext2D {
})
CanvasRenderingContext2D.createRadialGradient = function createRadialGradient(x0, y0, r0, x1, y1, r1) {
    catvm.debugger_()
    return CanvasGradient
};catvm.safefunction(CanvasRenderingContext2D.createRadialGradient);
CanvasRenderingContext2D.beginPath = function beginPath() {
    catvm.debugger_()
};catvm.safefunction(CanvasRenderingContext2D.beginPath);
CanvasRenderingContext2D.moveTo = function moveTo(x,y) {
    catvm.debugger_()
};catvm.safefunction(CanvasRenderingContext2D.moveTo);
CanvasRenderingContext2D.fillText = function fillText(x,y,z) {
    catvm.debugger_()
    return undefined
};catvm.safefunction(CanvasRenderingContext2D.fillText);
CanvasRenderingContext2D.arc=function arc(x,y,x1,y1,z1,z2) {
    catvm.debugger_()
    // return undefined
};catvm.safefunction(CanvasRenderingContext2D.arc);
CanvasRenderingContext2D.stroke=function stroke() {
    catvm.debugger_()
};catvm.safefunction(CanvasRenderingContext2D.stroke);
CanvasRenderingContext2D.quadraticCurveTo=function quadraticCurveTo(cpx, cpy, x, y) {
    catvm.debugger_()
};catvm.safefunction(CanvasRenderingContext2D.quadraticCurveTo);
CanvasRenderingContext2D.fill=function fill(path, fillRule) {
    catvm.debugger_()
};catvm.safefunction(CanvasRenderingContext2D.fill);
CanvasRenderingContext2D.ellipse=function ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
    catvm.debugger_()
};catvm.safefunction(CanvasRenderingContext2D.ellipse);
CanvasRenderingContext2D.bezierCurveTo=function bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
    catvm.debugger_()
};catvm.safefunction(CanvasRenderingContext2D.bezierCurveTo);
CanvasRenderingContext2D.strokeText=function strokeText(text, x, y) {
    catvm.debugger_()
};catvm.safefunction(CanvasRenderingContext2D.strokeText);




// CanvasGradient
CanvasGradient=catvm.proxy(class CanvasGradient {
})
CanvasGradient.addColorStop = function addColorStop(offset, color){
    catvm.debugger_()
};catvm.safefunction(CanvasGradient.addColorStop);
